package com.niji.littly_donkey_android.activity;

import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import com.niji.littly_donkey_android.R;
import com.niji.littly_donkey_android.util.StatusBarUtil;

public class MessageSettingActivity extends BaseActivity {

    private Button message_setting_return;

    private ImageView message_disturb;

    private ImageView message_disturb_left;

    private ImageView chat_message;

    private ImageView chat_message_left;

    private ImageView sound;

    private ImageView sound_left;

    private ImageView message_vibration;

    private ImageView message_vibration_left;



    @Override
    public void onCreate(final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.message_setting_activity);
        messageSettingReturn();
    }

    @Override
    protected int getLayoutId() {
        return R.layout.message_setting_activity;

    }
    @Override
    protected int getStatusBarColor() {
        return R.color.white_easy_photos;
    }

    private void messageVibration() {
        message_vibration.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (message_vibration.getVisibility() == View.INVISIBLE){
                    message_vibration.setVisibility(View.VISIBLE);
                    message_vibration_left.setVisibility(View.INVISIBLE);
                }else{
                    message_vibration.setVisibility(View.INVISIBLE);
                    message_vibration_left.setVisibility(View.VISIBLE);
                }
            }
        });
        message_vibration_left.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (message_vibration.getVisibility() == View.INVISIBLE){
                    message_vibration.setVisibility(View.VISIBLE);
                    message_vibration_left.setVisibility(View.INVISIBLE);
                }else{
                    message_vibration.setVisibility(View.INVISIBLE);
                    message_vibration_left.setVisibility(View.VISIBLE);
                }
            }
        });
    }

    private void soundSet() {
        sound.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (sound.getVisibility() == View.INVISIBLE){
                    sound.setVisibility(View.VISIBLE);
                    sound_left.setVisibility(View.INVISIBLE);
                }else{
                    sound.setVisibility(View.INVISIBLE);
                    sound_left.setVisibility(View.VISIBLE);
                }
            }
        });
        sound_left.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (sound.getVisibility() == View.INVISIBLE){
                    sound.setVisibility(View.VISIBLE);
                    sound_left.setVisibility(View.INVISIBLE);
                }else{
                    sound.setVisibility(View.INVISIBLE);
                    sound_left.setVisibility(View.VISIBLE);
                }
            }
        });
    }

    private void chatMessage() {
        chat_message_left.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (chat_message.getVisibility() == View.INVISIBLE){
                    chat_message.setVisibility(View.VISIBLE);
                    chat_message_left.setVisibility(View.INVISIBLE);
                }else{
                    chat_message.setVisibility(View.INVISIBLE);
                    chat_message_left.setVisibility(View.VISIBLE);
                }
            }
        });

        chat_message.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (chat_message.getVisibility() == View.INVISIBLE){
                    chat_message.setVisibility(View.VISIBLE);
                    chat_message_left.setVisibility(View.INVISIBLE);
                }else{
                    chat_message.setVisibility(View.INVISIBLE);
                    chat_message_left.setVisibility(View.VISIBLE);
                }
            }
        });
    }

    private void messageDisturb() {
        message_disturb_left.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (message_disturb.getVisibility() == View.INVISIBLE){
                    message_disturb.setVisibility(View.VISIBLE);
                    message_disturb_left.setVisibility(View.INVISIBLE);
                }else{
                    message_disturb.setVisibility(View.INVISIBLE);
                    message_disturb_left.setVisibility(View.VISIBLE);
                }
            }
        });

        message_disturb.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (message_disturb.getVisibility() == View.INVISIBLE){
                    message_disturb.setVisibility(View.VISIBLE);
                    message_disturb_left.setVisibility(View.INVISIBLE);
                }else{
                    message_disturb.setVisibility(View.INVISIBLE);
                    message_disturb_left.setVisibility(View.VISIBLE);
                }
            }
        });
    }

    private void messageSettingReturn() {
        message_setting_return = findViewById(R.id.message_setting_return);
        message_setting_return = findViewById(R.id.message_setting_return);
        message_setting_return.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                overridePendingTransition(R.anim.xpage_slide_in_left,R.anim.xpage_slide_out_right);
                finish();
            }
        });

    }
}
